#insert
fruits = ['apple', 'banana', 'orange']
fruits.insert(1, 'pear') #指定插入位置
print(fruits) #['apple', 'pear', 'banana', 'orange']

fruits.insert(-1, 'puple')
print(fruits) #['apple', 'pear', 'banana', 'puple', 'orange']

animals = ['cat', 'dog', 'fish']
animals.insert(2,['tiger', 'lion'])
print(animals) #['cat', 'dog', ['tiger', 'lion'], 'fish']


animals = ['cat', 'dog', 'fish']
animals.remove('fish')
print(animals) #['cat', 'dog'] 删除元素


colors = ['red', 'green', 'blue']
del_el = colors.pop()
print(colors) #['red', 'green']
print(del_el) #blue

colors = ['red', 'green', 'blue']
colors.pop(1)
print(colors) #['red', 'blue'] 删除指定位置的元素 索引位置为1

colors = ['red', 'green', 'blue']
colors.clear()
print(colors) #[] 删除所有元素